ProgrammingTips

Must Watch!



MustWatch

Playground AI 利用chatgpt制作AI网站 Dalle-2


Regarding jquery function application

to scrap imgs from database collect all addr database chops addr into sections onclick img, open predifined list of addrs and open window this may apply to all other similar database including text, vid, img, stks etc.

regarding the daily Stk Mon

setwd read the mon list check existence of stk database if not exist, collect it check for the most update date if not updated, update it assume the updated calculation is ready (which should be ready during update process) loop: collect the most update data compare with trigger value if above od below trigger value, warn keep warn report html repeat loop functions: collect database update daily data cal trends compare trigger warning action keep warn report html

regarding rewriting webpages for easy reading

collect addr ask for resulting filename grep the page header and tailer refine by line extraction if nessary save file

regarding select folder

put all possible seletions in list after selecting first choice, continue the select script action version 2 put all possible scripts in list after selection, continue execute script

javascript html learning tool:

hard coded array to store Q&A pairs script random choose items and show Qs with random As user select Answers script to identify correct answer and give marks

important to continue

D:\KPC\Dropbox\STK\Monitoring\MonTrend\monCodeNot complete.R

General Programming HowTo

General Programming HowTo

Script, or "cmdlet," used by Windows PowerShell,

a Windows shell program built on Microsoft's .NET Framework; contains a series of lines written in the PowerShell scripting language; similar to a .BAT or .CMD file, but executed by Windows PowerShell instead of the Windows CMD.EXE and COMMAND.COM programs. Cmdlets may examine the Windows registry and output results to a file. Cmdlets also support aliases, pipelines, and named and positional parameters for commands.

a framework

is just a bunch of code that the programmer can call without having to write it explicitly

learn engish

add userprofile to store user info and for adding word libraries userprofile is centralised access by user terminal libraries are centralised and access from terminal add new function to merge libraries

Bito AI

Bito AI 可以轻松编写代码、理解语法、编写测试用例、解释代码、评论代码、检查安全性,甚至解释高级概念。 更重要的是,它是一款免费工具。 Bito AI目前支持VS Code、Chrome插件,以及Jetbrains的全系列IDE,例如,IDEA、PyCharm、Clion等,可以说能够覆盖大部分开发同学了。

安装

VS Code的插件安装可以说是比较简单了,打开VS Code点击插件图标,搜索「Bito」,点击安装即可。 安装之后左侧工具栏会出现Bito的图标,点击之后需要注册登录一下,比较简单,用一个邮箱,接收一下验证码就可以直接登录。 登录之后创建个工作空间就可以开始使用了。

使用

前面提到过,Bito提供了很多实用的功能,例如,编写代码、理解语法、编写测试用例、解释代码、评论代码、检查安全性。 从我的使用角度具体点来讲,它提供的有几项功能非常使用。

生成代码

之前了解过ChatGPT的同学应该对这项功能比较熟悉,也比较新奇。 其实Bito也可以,而且效果同样很棒。 除了解决编码问题,它还可以用来解决开发过程中经常遇到的工程问题,例如,「如何配置git config变量」,它就会给出具体的步骤。 此外,在问答页面,它还会保存咨询历史,这一点还是很有帮助的,想回顾的时候随时可以回去看。

解释代码

这个功能简直太好用了! 作为开发者,阅读代码必不可少,阅读同事的代码,阅读开源项目等等。 这对于很多同学来说是一项非常艰巨的任务,需要站在其他开发者的角度去理解一段代码的含义。 选中代码,点击「Explain this code」: 下面看一下效果: 从结果可以看出来,它会逐行解释每行代码的功能,它是用来干什么的、有什么样的效果,解释非常详细。

测试用例

开发完代码,测试环节必不可少。 我们需要罗列不同场景,然后针对不同场景设计测试用例以此来验证代码的可靠性、稳定性。 虽然对很多同学来说这个环节很枯燥、很耗时,但却必不可少。 通过Bito真的是可以解放生产力了! 直接输入「Generate unit test for below code」+代码,它就会针对代码片段生成测试用例。 同样的用法还可以用Bito来提升代码性能、检查安全性、代码注释。 「how can I improve performance of this code?」+代码: 可以分析代码,提供提升代码性能的方法。 「Is this code secure? 」+代码: 可以检查代码的安全性。 「Explain this code and explain the parameters」+代码: 能够给出代码片段的注释。 需要强调一下,这些功能不仅可以用语言问答的方式使用,可以通过用户界面直接使用,选中代码,鼠标右键就会弹出相应的功能:

讲解概念

在开发过程中经常会用到一些理论和概念性的东西,例如,什么是B+树? 什么是动态规划? 它们该如何实现? 也可以直接在Bito界面询问得到答案: 从上面几个功能来看,这些都是编程开发过程中经常会用到的,能够覆盖绝大多数开发者的日常频繁的工作项。

Programming Maths

Programming Maths